<?php
/**
 * Copyright 2010 Dave Keen
 * http://www.actionscriptdeveloper.co.uk
 *
 * This file is part of Flextrine.
 *
 * Flextrine is free software: you can redistribute it and/or modify
 * it under the terms of the Lesser GNU General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * Lesser GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * and the Lesser GNU General Public License along with this program.
 * If not, see <http://www.gnu.org/licenses/>.
 *
 */

class FlextrineService extends \Flextrine\AbstractFlextrineService {

	protected $flextrineManagerEnabled = true;

	/**
	 * Enter the connection options for your database here.  See http://www.doctrine-project.org/projects/dbal/2.0/docs/reference/dbal for details on
	 * available connection options.
	 */
	function __construct() {
		$connectionOptions = array(
			'dbname' => 'databasename',
			'user' => 'database_user',
			'password' => 'database_password',
			'host' => 'localhost',
			'driver' => 'pdo_mysql',
		);

		parent::__construct(dirname(__FILE__), $connectionOptions);
	}

	/**
	 * You can configure custom operations that you can call from Flextrine here.
	 */
	protected function runCustomOperation($operation, $data) {
		/*switch ($operation) {
			case "dropSchema":
				$this->dropSchema();
				break;
			case "createSchema":
				$this->createSchema();
				break;
		}*/
	}

	protected function getSchemaEntities() {
		return parent::getSchemaEntities(dirname(__FILE__)."/../entities");
	}

}